package com.my.test;

import com.my.bean.Hello;
import com.my.config.HelloConfig;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author: marshal
 * @date: 2023-05-15 15:21
 */
public class HelloApp {

    @Test
    public void test() {
        ApplicationContext context = new AnnotationConfigApplicationContext(HelloConfig.class);
        Hello hello = context.getBean("hello", Hello.class);
        hello.printMessage();
    }
}
